package Demo;

public class test {
    public static void main(String[] args) {
        Cat cat = new Cat("淘气",3);
        System.out.println("==========");
        Cat cat2 = new Cat("咪咪",2);
    }
    public static void main1(String[] args) {
        Dog dog =new Dog("旺财",10);
        //dog类中并没有定义任何成员变量，name和age属性肯定是从父类Animal中继承来的
        dog.name ="大黄";
        dog.age = 2;
        dog.eat();
        dog.bark();
        System.out.println(dog.name);
        System.out.println(dog.age);

    }

}
